package pl.wroc.uni.ii.gdomo;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;

public abstract class Board {
	
	protected int currentLevel;
	protected Bitmap bitmap;
	protected Game game;
	
	public Board(Game game, int level) {
		this.game = game;
		currentLevel = level;
		setCurrentBitmap();
	}
	
	private void setCurrentBitmap() {
		int resourceId;
		switch (currentLevel/2) {
			case 0 :	resourceId = R.drawable.sharapova1; break;
			case 1 :	resourceId = R.drawable.sharapova2; break;
			case 2 :	resourceId = R.drawable.sharapova3; break;
			case 3 :	resourceId = R.drawable.sharapova4; break;
			default :	resourceId = R.drawable.sharapova5; break;
		}
		bitmap = BitmapFactory.decodeResource(game.getResources(), resourceId);
	}

	abstract public void select(int x, int y);

	abstract public void draw(Canvas canvas);

}
